package com.yixin.hospital.controller;

import com.yixin.hospital.common.ApiResult;
import com.yixin.hospital.service.ReportsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/reports")
@Api(value = "报表", tags = "报表")
public class ReportsController {

    @Resource
    private ReportsService reportsService;

    @GetMapping("/yearEnd")
    @ApiOperation(value = "年终统计")
    public ApiResult yearEnd(@RequestParam("code") String code) {
        return ApiResult.success(reportsService.yearEnd(code));
    }

}
